#ifndef _SPRITE_H_
# define _SPRITE_H_

# include "Utils\\Surface.h"
# include "Utils\\Rect.h"
# include <string>

# define ANIME_DELAY (Uint16)500

struct Sprite
{
private:
	int m_count;
	int m_lastCount;
	Uint16 m_delay;
	bool m_finish;

public:
	std::string Name;
	SDL::UTILS::Surface Src;
	SDL::UTILS::Rect CurrentFrame;

public:
	Sprite();
	Sprite(std::string const& _name, SDL_Surface* _surface, SDL::UTILS::Rect const& _frameSize, Uint16 _delay = ANIME_DELAY);
	Sprite(Sprite const& _sprite);
	~Sprite();

	Sprite& operator=(Sprite const& _sprite);

	void ResetFrame();
	bool SelectNextFrame();
	bool Animate();
	bool Finish() const;
};

#endif // _SPRITE_H_
